<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>DouPHP 管理中心</title>
    <meta name="Copyright" content="Douco Design." />
    <link rel="stylesheet" href="/Public/Static/Admin/css/zyUpload.css" type="text/css">
    <link href="/Public/Static/Admin/css/public.css" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="/Public/Static/Admin/themes/default/default.css" />
    <link rel="stylesheet" href="/Public/Static/Admin/plugins/code/prettify.css" />
    <script charset="utf-8" src="/Public/Static/Admin/kindeditor.js"></script>
    <script charset="utf-8" src="/Public/Static/Admin/lang/zh_CN.js"></script>
    <script charset="utf-8" src="/Public/Static/Admin/plugins/code/prettify.js"></script>

    <script type="text/javascript" src="/Public/Static/Admin/js/jquery.min.js"></script>
    <script type="text/javascript" src="/Public/Static/Admin/js/global.js"></script>
    <script src="/Public/Static/Admin/js/add_article.js"></script>

    <!--add_article.html-->
    <link rel="stylesheet" type="text/css" href="/Public/Static/Admin/datedropper.css">
    <link rel="stylesheet" type="text/css" href="/Public/Static/Admin/css/timedropper.min.css">
    <link rel="stylesheet" href="/Public/Static/Admin/css/zyUpload.css" type="text/css">

    <link rel="stylesheet" href="/editor/themes/default/default.css" />
    <link rel="stylesheet" href="/editor/plugins/code/prettify.css" />
    <script charset="utf-8" src="/editor/kindeditor.js"></script>
    <script charset="utf-8" src="/editor/lang/zh_CN.js"></script>
    <script charset="utf-8" src="/editor/plugins/code/prettify.js"></script>

    <script src="/Public/Static/Admin/js/zyFile.js"></script>
    <script src="/Public/Static/Admin/js/zyUpload.js"></script>
    <script src="/Public/Static/Admin/js/script.js"></script>
    <script src="/Public/Static/Admin/js/datedropper.min.js"></script>
    <script src="/Public/Static/Admin/js/timedropper.min.js"></script>
    <script type="text/javascript" src="/Public/Static/Admin/js/jquery.autotextarea.js"></script>


    <!--<script charset="utf-8" src="/Public/Static/Admin/js/kindeditor.js"></script>-->
    <!--<script charset="utf-8" src="/Public/Static/Admin/js/zh_CN.js"></script>-->
    <!--<script charset="utf-8" src="/Public/Static/Admin/js/prettify.js"></script>-->

</head>
<body>
<div id="dcWrap"> <div id="dcHead">
    <div id="head">
        <div class="logo"><a href="index.html"><img src="/Public/Static/Admin/images/dclogo.gif" alt="logo"></a></div>
        <div class="nav">
            <ul class="navRight">
                <li class="M noLeft"><a href="JavaScript:void(0);">您好，admin</a>
                    <div class="drop mUser">
                        <a href="manager.php?rec=edit&id=1">编辑我的个人资料</a>
                        <a href="manager.php?rec=cloud_account">设置云账户</a>
                    </div>
                </li>
                <li class="noRight"><a href="<?php echo U('/Index/login');?>">退出</a></li>
            </ul>
        </div>
    </div>
</div>
    <!-- dcHead 结束 --> <div id="dcLeft"><div id="menu">
        <ul class="top">
            <li><a href="<?php echo U('/Index/index');?>"><i class="home"></i><em>管理首页</em></a></li>
        </ul>
        <ul>
            <li><a href="<?php echo U('/ActInfo/index');?>"><i class="show"></i><em>文章管理</em></a></li>
            <li><a href="<?php echo U('/News/index');?>"><i class="page"></i><em>咨询管理</em></a></li>
        </ul>
        <ul>
            <li><a href="<?php echo U('/Order/index');?>"><i class="productCat"></i><em>订单管理</em></a></li>
        </ul>
        <ul>
            <li><a href="<?php echo U('/UserInfo/index');?>"><i class="articleCat"></i><em>会员管理</em></a></li>
        </ul>
        <ul class="bot">
            <li><a href="<?php echo U('/Backup/index');?>"><i class="backup"></i><em>数据备份</em></a></li>
            <li><a href="<?php echo U('/AdminInfo/index');?>"><i class="manager"></i><em>网站管理员</em></a></li>
            <li><a href="<?php echo U('/AdminPower/index');?>"><i class="manager"></i><em>超级管理员</em></a></li>
            <li><a href="manager.php?rec=manager_log"><i class="managerLog"></i><em>操作记录</em></a></li>
        </ul>
    </div>
    </div>
    <div id="dcMain"> <!-- 当前位置 -->


   <!-- 当前位置 -->
<div id="urHere">DouPHP 管理中心<b>></b><strong>网站管理员</strong> </div>   <div id="manager" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h3><a href="<?php echo U('/AdminInfo/addAdmin');?>" class="actionBtn">添加管理员</a>网站管理员</h3>

  <div class="filter">
   <form action="<?php echo U('index');?>" method="get">
    <input name="keyword" type="text" class="inpMain" value="<?php echo I('get.keyword');?>" placeholder="账户、真实姓名" size="30" />
    <select name="search">
     <option value="">--角色名称--</option>
     <option value="超级管理员" <?php if(I('get.search') == '超级管理员'): ?>selected="selected"<?php endif; ?>> 超级管理员 </option>
     <option value="副管理员" <?php if(I('get.search') == '副管理员'): ?>selected="selected"<?php endif; ?>> 副管理员 </option>
     <option value="员工" <?php if(I('get.search') == '员工'): ?>selected="selected"<?php endif; ?>> 员工 </option>
     <option value=""></option>
    </select>
    <input name="submit" class="btnGray" type="submit" value="筛选" />
   </form>
  </div>

        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     <tr>
      <th width="30" align="center">编号</th>
      <th align="left">管理员名称</th>
      <th align="center">真实姓名</th>
      <th align="center">角色名称</th>
      <th align="center">创建时间</th>
      <th align="center">最后一次登录IP</th>
      <th align="center">最后一次登录时间</th>
      <th align="center">登陆次数</th>
      <th align="center">操作</th>
     </tr>
         <?php if(is_array($data)): foreach($data as $key=>$val): ?><tr>
           <td width="30" align="center"><?php echo ($val['id']); ?></td>
           <td align="left"><?php echo ($val['admin_id']); ?></td>
           <td align="center"><?php echo ($val['real_name']); ?></td>
           <td align="center"><?php echo ($val['role_name']); ?></td>
           <td align="center"><?php echo ($val['creat_time']); ?></td>
           <td align="center"><?php echo ($val['last_login_ip']); ?></td>
           <td align="center"><?php echo ($val['last_login_time']); ?></td>
           <td align="center"><?php echo ($val['login_count']); ?></td>
           <td align="center">
             <?php if($val['id'] == '1' or $val['id'] == '2'): ?><a href="<?php echo U('/AdminInfo/modAdmin', array('id'=>$val['id']));?>">编辑</a>
             <?php else: ?>
                 <a href="<?php echo U('/AdminInfo/modAdmin', array('id'=>$val['id']));?>">编辑</a>
                 <a href="javascript:void(0);" class="delAdmin" data-id="<?php echo ($val['id']); ?>">删除</a><?php endif; ?>
           </td>
          </tr><?php endforeach; endif; ?>
         </table>
       <div class="clear"></div>
       <div class="pager">
           <?php echo ($show); ?>
       </div>
   </div>
   <script>
       $(function(){
           $('a.delAdmin').click(function(){
               if (confirm('确定要删除？')) {
                   var id = $(this).attr('data-id');
                   window.location.href = "/AdminInfo/delAdmin/id/"+id;
               }
           })
       });
   </script>

</body>
</html>

</div>
<div class="clear"></div>
<div id="dcFooter">
    <div id="footer">
        <div class="line"></div>
        <ul>
            版权所有 © 2017-2019 php1704
        </ul>
    </div>
</div><!-- dcFooter 结束 -->
<div class="clear"></div> </div>

</body>
</html>